package com.clss.emergencycall.tools.eventbus;

import com.amap.api.location.AMapLocation;
import com.amap.api.services.help.Tip;
import com.clss.emergencycall.bean.ChatMsgTextEntity;
import com.clss.emergencycall.bean.DeviceEvent;
import com.clss.emergencycall.module.imui.enity.MessageInfo;
import com.clss.webrtclibrary.MediaInfoBean;
import com.clss.emergencycall.bean.StompMessageEntity;

/**
 * EventBus传递通知的封装类
 * Created by LiuV on 2017/6/13.
 */

public class EventBusMessage {
    private int code;
    private String message;
    private String str2;
    private String str3;
    private String str4;
    private String str5;
    private boolean b1;
    private boolean b2;
    private long time = -1;
    private int type = -1;
    private String stompId;
    private String friendId;
    private ChatMsgTextEntity chatMsgTextEntity;
    private StompMessageEntity entity;
    private Tip tip;
    private MessageInfo messageInfo;
    private DeviceEvent deviceEvent;

    /**
     * eventbus消息中转站，这儿每条消息都有对应的数据传输
     * **/
    public static final int UPDATA_FRENDSAFING = 18676;
    public static final int BACK_FRIEND_DETAIL = 18677; //关闭好友详情页发出
    public static final int SAVE_ALL_URL_MAP = 18678;
    public static final int UPDATA_FRENDSAFING_LIST = 18679; //添加好友后 刷新好友列表页面 以及 好友邀请数
    public static final int UPDATA_MAP = 18680;      //刷新安全守护神页面 同事提示录音状态
    public static final int  UPDATA_ALL_SERVICE = 18681; //刷新全部服务页面
    public static final int HOME_SIDE_STATUES = 18682; //是否显示我的工作
    public static final int UPLOAD_UPDATE_THE = 18683; //刷新当前守护人页面顶部数据
    public static final int UPLOAD_HOME_RED = 18684; //通知显示首页小红点

    public static final int SHOW_VIDEO_CAHT = 18685; //通知安全守护神页面显示顶部状态（是否还有实时视频）
    public static final int UPDATA_VIDEO_SAFE_TIME = 18686; //安全守护神通知刷新时间
    public static final int SHOW_VIDEO_RECORD_DETAIL = 18688; //通知出行详情页面显示直播浮窗

    public static final int OR_SWITCH_LOCATION = 18689; //通知BaseActivity 弹出提示 是否需要转换地址
    public static final int UPDATA_ALL_MODO_SERVICE = 18690; //通知首页面刷新顶部文字
    public static final int COAST_SAFE_GEGIN_VIEO = 18691; //通知守护神页面 进入直播了
    public static final int UPDATE_FRIEND_NEWS_NAME = 18692; //修改好友名字成功 刷新好友详情
    public static final int LEAVE_POLICE_PAGE = 18693; //离开报警页面（现在代表回到这个页面）
    public static final int LEAVE_ALL_MODEL = 18694; //离开所有服务页面
    public static final int SEND_ALL_BLOCK_WINDOW = 18695; // 聊天页面退出 通知前一个页面（BaseActivity）关闭多余弹窗
    public static final int SELECT_LOCAIION_FOR_MAP = 18699;//选择地址页面返回时调用
    public static final int SEND_HOME_GO_All = 18700; //通知首页跳转到全部页面
    /** 刷新分组列表页 */
    public static final int UPDATA_GROUP_LIST_FRAGMENT = 18696;
    /**刷新分组管理列表 */
    public static final int UPDATA_GROUP_MANAGER_LIST = 18697;
    /**退出我加入的组页面，并刷新我的组页面 */
    public static final int UPDATA_MY_GROUP_BACK_JOINS = 18698;
    /**退出分组守护 刷新守护神页面守护组 */
    public static final int UPDATA_SAFE_GROUP_IN_S= 18699;
    /** 从选择地址回到创建组（集合） */
    public static final int SEND_LOCATION_FOR_ADD_GROUP = 18707;
    /** 搜索地图页面 选择地点回退 */
    public static final int SEARCH_SITE_SELECT = 18708;
    /** 修改（添加）集合通知完成 */
    public static final int ADD_GATHER_SUCCESS = 18709;
    /** 集合签到成功 */
    public static final int GATHER_SIGN_SUCCESS = 18710;
    /** 集合 队伍解散 */
    public static final int GATHER_TEAM_NONE = 18711;
    /** 通知chat聊天小红点 */
    public static final int UPLOAD__RED_CHAT = 18712;
    /** 刷新亲友守护组队状态 */
    public static final int UPDATA_SAFE_STATUS_GATHER = 18713;
    /**上传位置*/
    public static final int UPDATE_LOCATION = 18714;
    /**停止上传位置*/
    public static final int UPDATE_LOCATION_STOP = 18715;
    /** 队伍管理 */
    public static final int UPDATE_TEAM_MANAGER = 18716;
    /** 刷新出行页顶部名称 */
    public static final int UPDATE_TEAM_GOING_NAME = 18717;
    /** 刷新警示音列表 */
    public static final int UPDATE_WARNING_TONES = 18718;
    /** 警示音列表播放音频 */
    public static final int WARNING_TONES_PLAY_MUSIC = 18719;
    /** 更新亲友互助页面名字 */
    public static final int WARNING_SETTING_NSME = 18720;
    /**传递线索详情 创建位置信息*/
    public static final int UPDATE_CLUE_DETAIL_LOCATION = 18721;
    /**通知消息停止加载*/
    public static final int MSG_CHAT_STOP_SEND = 18722;
    /** 退出集合分组   */
    public static final int GATHER_BACK_ALL = 18724;
    /** 集合队长页刷新队员列表   */
    public static final int  UPDATE_GRAPER_LIST= 18726;
    /** 修改创建队伍名称   */
    public static final int  CHANGE_TEAM_NAME= 18728;
    /** 修改创建队伍名称   */
    public static final int  CLOSE_MAIN_CONFILOCATION= 18730;
    /** 出行已停止   */
    public static final int  SAFE_TRIP_STOPED = 18732;
    /** 退出了照相录像页面 */
    public static final int  CLOSR_SHOE_PHOTO = 18735;

    /** 微信支付完成 */
    public static final int  WX_PAY_FINISHED = 19000;

    /** 微信支付报错，可能的原因：签名错误、未注册APPID、项目设置APPID不正确、注册的APPID与设置的不匹配、其他异常等。 */
    public static final int  WX_PAY_ERROR = 18999;

    /** 微信支付取消，可能的原因：无需处理。发生场景：用户不支付了，点击取消，返回APP。 */
    public static final int  WX_PAY_CANCEL = 18998;

    /** 人脸验证完成 */
    public static final int VERIFY_IS_FINISHED = 11000;
    /** 需要实名认证 */
    public static final int NEED_TO_VERIFY = 11001;

    public EventBusMessage(int code) {
        this(code, "");
    }

    public EventBusMessage(String msg) {
        this(-1, msg);
    }

    public EventBusMessage(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public EventBusMessage(int code, DeviceEvent deviceEvent) {
        this.code = code;
        this.deviceEvent = deviceEvent;
    }

    public EventBusMessage(int code, Boolean b1) {
        this.code = code;
        this.b1 = b1;
    }

    public EventBusMessage(int code, String message, long time, int type) {
        this.code = code;
        this.message = message;
        this.time = time;
        this.type = type;
    }

    public EventBusMessage(int code, String msg, String msg2){
        this.code = code;
        this.message = msg;
        this.str2 = msg2;
    }

    public EventBusMessage(int code, String stompId, ChatMsgTextEntity chatMsgTextEntity){
        this.code = code;
        this.stompId = stompId;
        this.chatMsgTextEntity = chatMsgTextEntity;
    }

    public EventBusMessage(int code, StompMessageEntity entity) {
        this.code = code;
        this.entity = entity;
    }

    public EventBusMessage(int code, MessageInfo messageInfo, String msg) {
        this.code = code;
        this.messageInfo = messageInfo;
        this.message = msg;
    }

    public StompMessageEntity getEntity() {
        return entity;
    }

    public ChatMsgTextEntity getChatMsgTextEntity() {
        return chatMsgTextEntity;
    }

    public void setChatMsgTextEntity(ChatMsgTextEntity chatMsgTextEntity) {
        this.chatMsgTextEntity = chatMsgTextEntity;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getStr2() {
        return str2;
    }

    public void setStr2(String str2) {
        this.str2 = str2;
    }

    public boolean isB1() {
        return b1;
    }

    public void setB1(boolean b1) {
        this.b1 = b1;
    }

    public int getCode() {
        return code;
    }

    public void setB2(boolean b2) {
        this.b2 = b2;
    }

    public boolean isB2() {
        return b2;
    }

    public Tip getTip() {
        return tip;
    }

    public void setTip(Tip tip) {
        this.tip = tip;
    }

    public String getMessage() {
        return message;
    }

    public long getTime() {
        return time;
    }

    public int getType() {
        return type;
    }

    public String getStr3() {
        return str3;
    }

    public void setStr3(String str3) {
        this.str3 = str3;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getStr4() {
        return str4;
    }

    public void setStr4(String str4) {
        this.str4 = str4;
    }

    public String getStr5() {
        return str5;
    }

    public void setStr5(String str5) {
        this.str5 = str5;
    }

    public String getStompId() {
        return stompId;
    }

    public void setStompId(String stompId) {
        this.stompId = stompId;
    }

    private MediaInfoBean mMediaInfoBean;

    public MediaInfoBean getMediaInfoBean() {
        return mMediaInfoBean;
    }

    public void setMediaInfoBean(MediaInfoBean mediaInfoBean) {
        mMediaInfoBean = mediaInfoBean;
    }

    public String getFriendId() {
        return friendId;
    }

    public void setFriendId(String friendId) {
        this.friendId = friendId;
    }

    private AMapLocation mAMapLocation;

    public AMapLocation getAMapLocation() {
        return mAMapLocation;
    }

    public void setAMapLocation(AMapLocation amaplocation) {
        mAMapLocation = amaplocation;
    }

    public MessageInfo getMessageInfo() {
        return messageInfo;
    }

    public void setMessageInfo(MessageInfo messageInfo) {
        this.messageInfo = messageInfo;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public void setTime(long time) {
        this.time = time;
    }

    public void setEntity(StompMessageEntity entity) {
        this.entity = entity;
    }

    public DeviceEvent getDeviceEvent() {
        return deviceEvent;
    }

    public void setDeviceEvent(DeviceEvent deviceEvent) {
        this.deviceEvent = deviceEvent;
    }

    @Override
    public String toString() {
        return "EventBusMessage{" +
                "code=" + code +
                ", message='" + message + '\'' +
                ", str2='" + str2 + '\'' +
                ", str3='" + str3 + '\'' +
                ", str4='" + str4 + '\'' +
                ", str5='" + str5 + '\'' +
                ", b1=" + b1 +
                ", b2=" + b2 +
                ", time=" + time +
                ", type=" + type +
                ", stompId='" + stompId + '\'' +
                ", friendId='" + friendId + '\'' +
                ", chatMsgTextEntity=" + chatMsgTextEntity +
                ", entity=" + entity +
                ", tip=" + tip +
                ", messageInfo=" + messageInfo +
                ", deviceEvent=" + deviceEvent +
                ", mMediaInfoBean=" + mMediaInfoBean +
                ", mAMapLocation=" + mAMapLocation +
                '}';
    }
}
